package com.ruoyi.project.manage.park.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.manage.park.mapper.DwThemeParkMapper;
import com.ruoyi.project.manage.park.domain.DwThemePark;
import com.ruoyi.project.manage.park.service.IDwThemeParkService;
import com.ruoyi.common.utils.text.Convert;

/**
 * 主题乐园信息Service业务层处理
 * 
 * @author mhg
 * @date 2021-10-04
 */
@Service
public class DwThemeParkServiceImpl implements IDwThemeParkService 
{
    @Autowired
    private DwThemeParkMapper dwThemeParkMapper;

    /**
     * 查询主题乐园信息
     * 
     * @param id 主题乐园信息主键
     * @return 主题乐园信息
     */
    @Override
    public DwThemePark selectDwThemeParkById(Long id)
    {
        return dwThemeParkMapper.selectDwThemeParkById(id);
    }

    /**
     * 查询主题乐园信息列表
     * 
     * @param dwThemePark 主题乐园信息
     * @return 主题乐园信息
     */
    @Override
    public List<DwThemePark> selectDwThemeParkList(DwThemePark dwThemePark)
    {
        return dwThemeParkMapper.selectDwThemeParkList(dwThemePark);
    }

    /**
     * 新增主题乐园信息
     * 
     * @param dwThemePark 主题乐园信息
     * @return 结果
     */
    @Override
    public int insertDwThemePark(DwThemePark dwThemePark)
    {
        dwThemePark.setCreateTime(DateUtils.getNowDate());
        return dwThemeParkMapper.insertDwThemePark(dwThemePark);
    }

    /**
     * 修改主题乐园信息
     * 
     * @param dwThemePark 主题乐园信息
     * @return 结果
     */
    @Override
    public int updateDwThemePark(DwThemePark dwThemePark)
    {
        return dwThemeParkMapper.updateDwThemePark(dwThemePark);
    }

    /**
     * 批量删除主题乐园信息
     * 
     * @param ids 需要删除的主题乐园信息主键
     * @return 结果
     */
    @Override
    public int deleteDwThemeParkByIds(String ids)
    {
        return dwThemeParkMapper.deleteDwThemeParkByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除主题乐园信息信息
     * 
     * @param id 主题乐园信息主键
     * @return 结果
     */
    @Override
    public int deleteDwThemeParkById(Long id)
    {
        return dwThemeParkMapper.deleteDwThemeParkById(id);
    }
}
